import com.kuang.dao.TeacherMapper;
import com.kuang.pojo.Teacher;
import com.kuang.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;



public class Mytest {
 @Test
    public void test(){
      SqlSession sqlSession = MybatisUtils.getSqlSession();
     TeacherMapper mapper = sqlSession.getMapper(TeacherMapper.class);
     Teacher teacher = mapper.getTeacher(1);
     System.out.println(teacher);

     sqlSession.close();

 }
 @Test
   public void test2(){
  SqlSession sqlSession = MybatisUtils.getSqlSession();
  TeacherMapper mapper = sqlSession.getMapper(TeacherMapper.class);
  Teacher teacher = mapper.getTeacher2(1);
  System.out.println(teacher);

  sqlSession.close();

 }

   }




